#! /bin/bash

## 安装jupyter d2l pytorch 
pip3 install jupyterlab==3.0.12 # or use 'pip3 install jupyterlab' cmd to install the latest version

## 配置jupyterlab
jupyter lab --generate-config

cd /root/.jupyter/
# echo "c.ServerApp.root_dir = '/home/ckycst/'" >> jupyter_lab_config.py
echo "c.ServerApp.ip = '192.168.31.182'" >> jupyter_lab_config.py
echo "c.ServerApp.token = '123456'" >> jupyter_lab_config.py
echo "c.ServerApp.allow_remote_access = True" >> jupyter_lab_config.py
echo "c.ServerApp.open_browser = False" >> jupyter_lab_config.py
echo "c.ServerApp.port = 8888" >> jupyter_lab_config.py

pip3 install d2l torch torchvision

## 安装opencv，在-i 后面加上国内源， 其他源如下list
## 清华：https://pypi.tuna.tsinghua.edu.cn/simple
## 阿里云：http://mirrors.aliyun.com/pypi/simple/
## 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
## 华中理工大学：http://pypi.hustunique.com/
## 山东理工大学：http://pypi.sdutlinux.org/ 
## 豆瓣：http://pypi.douban.com/simple/

pip3 install opencv-python -i https://pypi.mirrors.ustc.edu.cn/simple/